﻿namespace KubertSoft.MSBuildTasks.Subversion.Svn
{
    /// <summary>
    /// While Subversion has different switches for its subcommands, all switches are global—that is, 
    /// each switch is guaranteed to mean the same thing regardless of the subcommand you use it with. 
    /// For example, --verbose (-v) always means “verbose output”, regardless of the subcommand you use it with.
    /// </summary>
    class CommandLineSwitches
    {
        /// <summary>
        /// Enables auto-props, overriding the enable-auto-props directive in the config file.
        /// </summary>
        public const string AutoProps = "--auto-props";

        /// <summary>
        /// Instructs Subversion to read configuration information from the specified directory 
        /// instead of the default location (.subversion in the user's home directory).
        /// </summary>
        /// <example>--config-dir DIR</example>
        public const string ConfigDir = "--config-dir";
       
        /// <summary>
        /// Specifies an external program to use to show differences between files. 
        /// When svn diff is invoked, it uses Subversion's internal diff engine, which provides 
        /// unified diffs by default. If you want to use an external diff program, use --diff-cmd. 
        /// You can pass switches to the diff program with the --extensions switch 
        /// (more on that later in this section).
        /// </summary>
        /// <example>--diff-cmd CMD</example>
        public const string DiffCmd = "--diff-cmd";

        /// <summary>
        /// Specifies an external program to use to merge files.
        /// </summary>
        /// <example>--diff3-cmd CMD</example>
        public const string Diff3Cmd = "--diff3-cmd";

        /// <summary>
        /// Goes through all the motions of running a command, 
        /// but makes no actual changes—either on disk or in the repository.
        /// </summary>
        public const string DryRun = "--dry-run";

        /// <summary>
        /// Specifies an external program to use to edit a log message or a property value.
        /// </summary>
        /// <example>--editor-cmd CMD</example>
        public const string EditorCmd = "--editor-cmd";

        /// <summary>
        /// Tells Subversion that your commit message is encoded in the charset provided. 
        /// The default is your operating system's native locale, and you should specify the encoding 
        /// if your commit message is in any other encoding.
        /// </summary>
        /// <example>--encoding ENC</example>
        public const string Encoding = "--encoding";

        /// <summary>
        /// Specifies an argument or arguments that Subversion should pass to an external diff command 
        /// when providing differences between files. If you wish to pass multiple arguments, 
        /// you must enclose all of them in quotes (for example, svn diff --diff-cmd /usr/bin/diff -x "-b -E"). 
        /// This switch can only be used if you also pass the --diff-cmd switch.
        /// </summary>
        /// <remarks>Short usage: -x.</remarks>
        /// <example>--extensions ARGS</example>
        public const string Extension = "--extensions";

        /// <summary>
        /// Uses the contents of the file passed as an argument to this switch for the specified subcommand.
        /// </summary>
        /// <remarks>Short usage: -F.</remarks>
        /// <example>--file FILENAME</example>
        public const string File = "--file";

        /// <summary>
        /// Forces a particular command or operation to run. There are some operations that Subversion 
        /// will prevent you from doing in normal usage, but you can pass the force switch to tell Subversion 
        /// “I know what I'm doing as well as the possible repercussions of doing it, so let me at 'em”. 
        /// This switch is the programmatic equivalent of doing your own electrical work with the power on — 
        /// if you don't know what you're doing, you're likely to get a nasty shock.
        /// </summary>
        public const string Force = "--force";

        /// <summary>
        /// Forces a suspicious parameter passed to the --message (-m) or --file (-F) options to be accepted as valid. 
        /// By default, Subversion will produce an error if parameters to these options look like 
        /// they might instead be targets of the subcommand. For example, 
        /// if you pass a versioned file's path to the --file (-F) option, 
        /// Subversion will assume you've made a mistake, that the path was instead intended as the target of the operation, 
        /// and that you simply failed to provide some other—unversioned—file as the source of your log message. 
        /// To assert your intent and override these types of errors, pass the --force-log option 
        /// to commands that accept log messages.
        /// </summary>
        public const string ForceLog = "--force-log";

        /// <summary>
        /// If used with one or more subcommands, shows the built-in help text for each subcommand. 
        /// If used alone, it displays the general client help text.
        /// </summary>
        /// <remarks>Short usage: -h or -?.</remarks>
        public const string Help = "--help";

        /// <summary>
        /// Tells Subversion to ignore ancestry when calculating differences (rely on path contents alone).
        /// </summary>
        public const string IgnoreAncestry = "--ignore-ancestry";

        /// <summary>
        /// Prints output in a format suitable for concatenation.
        /// </summary>
        public const string Incremental = "--incremental";

        /// <summary>
        /// Indicates that you will specify a commit message on the command line, following this switch.
        /// </summary>
        /// <remarks>Short usage: -m.</remarks>
        /// <example>$ svn commit -m "They don't make Sunday."</example>
        public const string Message = "--message";

        /// <summary>
        /// Uses ARG as the newer target.
        /// </summary>
        /// <example>--new ARG</example>
        public const string New = "--new";

        /// <summary>
        /// Prevents caching of authentication information (e.g. username and password) in the Subversion 
        /// administrative directories.
        /// </summary>
        public const string NoAuthCache = "--no-auth-cache";

        /// <summary>
        /// Disables auto-props, overriding the enable-auto-props directive in the config file.
        /// </summary>
        public const string NoAutoProps = "--no-auto-props";

        /// <summary>
        /// Prevents Subversion from printing differences for deleted files. 
        /// The default behavior when you remove a file is for svn diff to print the same differences 
        /// that you would see if you had left the file but removed all the content.
        /// </summary>
        public const string NoDiffDeleted = "--no-diff-deleted";

        /// <summary>
        /// Shows files in the status listing that would normally be omitted since they match a pattern 
        /// in the global-ignores configuration option or the svn:ignore property. 
        /// </summary>
        public const string NoIgnore = "--no-ignore";

        /// <summary>
        /// In the case of an authentication failure, or insufficient credentials, 
        /// prevents prompting for credentials (e.g. username or password). 
        /// This is useful if you're running Subversion inside of an automated script and 
        /// it's more appropriate to have Subversion fail than to prompt for more information.
        /// </summary>
        public const string NonInteractive = "--non-interactive";

        /// <summary>
        /// Stops a subcommand from recursing into subdirectories. Most subcommands recurse by default, 
        /// but some subcommands—usually those that have the potential to remove or undo your local modifications—do not.
        /// </summary>
        /// <remarks>Short usage: -N.</remarks>
        public const string NonRecursive = "--non-recursive";

        /// <summary>
        /// Pay attention to ancestry when calculating differences.
        /// </summary>
        public const string NoticeAncestry = "--notice-ancestry";

        /// <summary>
        /// Uses argument as the older target.
        /// </summary>
        /// <example>--old ARG</example>
        public const string Old = "--old";

        /// <summary>
        /// Indicates that you are providing your password for authentication on the command line—otherwise, 
        /// if it is needed, Subversion will prompt you for it.
        /// </summary>
        /// <example>--password PASS</example>
        public const string Password = "--password";

        /// <summary>
        /// Requests that the client print only essential information while performing an operation.
        /// </summary>
        /// <remarks>Short usage: -q.</remarks>
        public const string Quiet = "--quiet";

        /// <summary>
        /// Makes a subcommand recurse into subdirectories. Most subcommands recurse by default.
        /// </summary>
        /// <remarks>Short usage: -R.</remarks>
        public const string Recursive = "--recursive";

        /// <summary>
        /// Used with the svn switch subcommand, changes the location of the repository 
        /// that your working copy references. This is useful if the location of your repository changes and 
        /// you have an existing working copy that you'd like to continue to use. See svn switch for an example.
        /// </summary>
        /// <example>--relocate FROM TO [PATH...]</example>
        public const string Relocate = "--relocate";

        /// <summary>
        /// Indicates that you're going to supply a revision (or range of revisions) for a particular operation. 
        /// You can provide revision numbers, revision keywords or dates (in curly braces), 
        /// as arguments to the revision switch. If you wish to provide a range of revisions, 
        /// you can provide two revisions separated by a colon.
        /// </summary>
        /// <remarks>Short usage: -r.</remarks>
        /// <example>
        /// $ svn log -r 1729
        /// $ svn log -r 1729:HEAD
        /// $ svn log -r 1729:1744
        /// $ svn log -r {2001-12-04}:{2002-02-17}
        /// $ svn log -r 1729:{2002-02-17}
        /// </example>
        public const string Revision = "revision";

        /// <summary>
        /// Operates on a revision property instead of a Subversion property specific to a file or directory. 
        /// This switch requires that you also pass a revision with the --revision (-r) switch. 
        /// </summary>
        public const string RevisionProperty = "--revprop";

        /// <summary>
        /// Causes the client to display information about which files in your working copy are out-of-date. 
        /// This doesn't actually update any of your files—it just shows you which files will be updated if you run svn update.
        /// </summary>
        /// <remarks>Short usage: -u.</remarks>
        public const string ShowUpdates = "--show-updates";
 
        /// <summary>
        /// Causes a Subversion subcommand which is traversing the history of a versioned resource 
        /// to stop harvesting that historical information when a copy—that is, 
        /// a location in history where that resource was copied from another location in the repository—is encountered.
        /// </summary>
        public const string StopOnCopy = "--stop-on-copy";

        /// <summary>
        /// Causes Subversion to use strict semantics, a notion which is rather vague unless 
        /// talking about specific subcommands.
        /// </summary>
        public const string Strict = "--strict";

        /// <summary>
        /// Tells Subversion to get the list of files that you wish to operate on from the filename 
        /// you provide instead of listing all the files on the command line.
        /// </summary>
        /// <example>--targets FILENAME</example>
        public const string Targets = "--targets";

        /// <summary>
        /// Indicates that you are providing your username for authentication on the command line—otherwise, 
        /// if it is needed, Subversion will prompt you for it.
        /// </summary>
        /// <example>--username NAME</example>
        public const string Username = "--username";

        /// <summary>
        /// Requests that the client print out as much information as it can while running any subcommand. 
        /// This may result in Subversion printing out additional fields, detailed information about every file, 
        /// or additional information regarding its actions.
        /// </summary>
        /// <remarks>Short usage: -v.</remarks>
        public const string Verbose = "--verbose";

        /// <summary>
        /// Prints the client version info. This information not only includes the version number 
        /// of the client, but also a listing of all repository access modules that the client 
        /// can use to access a Subversion repository.
        /// </summary>
        public const string Version = "--version";
      
        /// <summary>
        /// Prints output in XML format.
        /// </summary>
        public const string Xml = "--xml";
    }
}


